﻿/********************************************************************************/
// <copyright file="ModuleFactory.cs" company="Asia E-Business Solutions">
//     Copyright © 2012. All right reserved
// </copyright>
// <history>
//     <change who="Phuoc Le" date="24/12/2012 5:24:02 PM">Created</change>
// </history>
/********************************************************************************/

using System;
using System.Collections.Generic;
using LINQ = JLL.China.Infrastructure.Repositories.LINQ2SQL;

namespace JLL.China.Infrastructure.Repositories.Admin
{
    public static class ModuleFactory
    {
         public static Model.Module FromLINQObject(LINQ.Module module)
        {
            if (module == null)
                return null;
            else
            {
                var model = new Model.Module
                {
                    ID = (int)module.Module_ID,
                    ModuleName = module.Name,
                    Slug = module.Slug,
                    Status = module.Status
                };
                return model;
            }
        }
    }
}
